//
//  HttpServerRequest.hpp
//  myhttpserver
//
//  Created by tgy on 2018/3/19.
//  Copyright © 2018年 tgy. All rights reserved.
//

#ifndef HttpServerRequest_hpp
#define HttpServerRequest_hpp

#include <stdio.h>
#include <string>
#include <map>
#include "HttpMessage.hpp"
#include "Client.hpp"

class HttpServerRequest:public HttpMessage {
    
private:
    //服务器基本路径
    std::string basePath;
    void getHander(Client *client);
    void postHander(Client *client);
    void readFile(Client *client,std::string path);
    void readDir(Client *client,std::string path);
public:
    HttpServerRequest(std::string data):HttpMessage(data){
        
        basePath = "./file";
    };
    
    void dispatch(Client *client);
};


#endif /* HttpServerRequest_hpp */
